#include "random.h"

Q_GLOBAL_STATIC(Random,instance)

Random *Random::getInstance()
{
    return instance();
}

Random::Random(QObject *parent): QObject(parent)
{
    qtime = QTime::currentTime();
    qsrand(qtime.msec() + qtime.second() * 1000);
}

int Random::getIntRandom(int max){
    return qrand() % max;
}
